<div class="box box-maxbid">
    <div class="col-xs-12">

        <h3 class="box-title" style="margin-bottom: 0px;">
            Arrematantes
        </h3>
        <br>
    </div>
    <div class="col-md-5">
        <div class="form-group">
            <div class="input-group col-md-12 filter">
                <span class="input-group-addon"><i class="glyphicon glyphicon-filter"></i></span>
                <input type="text" placeholder="Pesquisa..." class="form-control ng-pristine ng-valid" ng-model="search"  ng-change="filter()"  style="">
                <span class="input-group-addon btn btn-default" ng-disabled="search.length == 0" ng-click="resetSearch()" disabled="disabled"><i class="fa fa-times"></i></span>
            </div>
        </div>
    </div>
    <div class="col-md-4">
        <div class="form-group">
            <a href="#/buyers/add" class="btn btn-primary">Cadastrar</a>
        </div>
    </div>

    <div class="col-md-12" ng-show="filteredItems > 0">
        <table class="table table-striped table-bordered">
            <thead>
            <th style="width: 60px; text-align: center;">Id&nbsp;<a href="#" coc-click-prevent ng-click="sort_by('ID');"><i class="fa fa-sort"></i></a></th>
            <th>Nome&nbsp;<a href="#" coc-click-prevent ng-click="sort_by('NOME');"><i class="fa fa-sort"></i></a></th>
            <th>Usuário&nbsp;<a href="#" coc-click-prevent ng-click="sort_by('LOGIN');"><i class="fa fa-sort"></i></a></th>
            <th>Email&nbsp;</th>
            <th>Telefone&nbsp;</th>
            <th>CADASTRO&nbsp;</th>
            <th style="width: 60px; text-align: center;">#</th>    
            </thead>
            <tbody>
                <tr ng-repeat="data in  filtered = (list| filter:search | orderBy:orderByFnc:reverse)| startFrom:(currentPage - 1) * entryLimit | limitTo: entryLimit"   >

                    
                    <td style="width: 60px; text-align: center;">{{data.ID| number}}</td>
                    <td class="col-xs-4">{{data.NOME}} <span ng-if="data.NEW_USER == 'yes'" class="label label-success"><?php echo lang_system('admin_new_user'); ?></span></td>
                    <td class="col-md-2 col-lg-1 col-xs-2">{{data.LOGIN}}</td>
                    <td><small>{{data.EMAIL}}</small></td>
                    <td>{{data.TELEFONE}}</td>
                    <td style="width: 55px; text-align: center;">{{data.CREATE}}</td>
                    <td style="width: 120px; text-align: center;">
                        <div class="btn-group"> 
                            <a href="#/user/changeStatus/{{data.ID}}/1/users" ng-if="data.ACTIVE == 0" coc-click-prevent  coc-tool-tip title="Liberar usuário" class="btn btn-sm btn-default fa fa-star-o"></a>
                            <a href="#/user/changeStatus/{{data.ID}}/0/users" ng-if="data.ACTIVE == 1" coc-click-prevent  coc-tool-tip title="Bloquear usuário" class="btn text-blue btn-sm btn-default fa fa-star"></a>
                            <a href="#/buyers/settings/{{data.ID}}/{{data.TIPO}}" coc-click-prevent  class="btn btn-sm btn-default fa fa-edit"></a>
                            <a href="#" ng-click="delete(data.ID)" coc-click-prevent  class="fa btn btn-sm btn-default fa-trash-o"></a>

                        </div>


                    </td>  
                </tr>
            </tbody>
        </table>
    </div>
    <div class="col-md-12" ng-show="filteredItems == 0">
        <div class="col-md-12">
            <h4><?php echo lang_system('no_data'); ?></h4>
        </div>
    </div>
    <div class="col-md-12" ng-show="filteredItems > 0">    
        <div pagination="" page="currentPage" on-select-page="setPage(page)" boundary-links="true" total-items="filteredItems" items-per-page="entryLimit" class="pagination-small" previous-text="&laquo;" next-text="&raquo;"></div>
    </div>
    <div class="clearfix"></div>
</div>
